/*
 * @Author: zxh
 * @Email: 1271027008@qq.com
 * @Date: 2020-02-24 08:53:28
 * @Descripttion: 有效期管理
 */

import { Injectable } from '@angular/core';
import { SubwarehouseManageService } from '../../basedata-manage/subwarehouse-manage/subwarehouse-manage.service'
import { Observable } from 'rxjs';
import { HttpClient, HttpParams } from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class EffectiveManageService {

  private validityUrl = '/api/stockBatchExp'
  private batchUrl = '/api/stockBatchExp/reserve'
  private verifyUrl = '/api/stockBatchExp/check'

  constructor(
    private SubwarehouseManageService:SubwarehouseManageService,
    private http:HttpClient
  ) { }
  // 获取库房
  getFKList():Observable<any>{
    return this.SubwarehouseManageService.getKFAllList().pipe()
  }
  // 获取有效期管理列表
  getValidityList(data):Observable<any>{
    return this.http.get(this.validityUrl,{params:data}).pipe()
  }

  // 提交请验
  verify(data):Observable<any>{
    return this.http.post(this.verifyUrl,data).pipe()
  }
  // 批次预留
  batch(data):Observable<any>{
    return this.http.post(this.batchUrl,data).pipe()
  }

}
